home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 123
/
(Vol 123) Jan 13 2011.iso
/
Games
/
island_fishing.swf
/
scripts
/
frame_223
/
DoAction.as
Wrap
Text File
|
2011-01-13
|
1KB
|
49 lines
stop();
_root.hunger = 100;
_root.fishtotal = 0;
_root.fish = 0;
x1 = _root.rodend._x;
y1 = _root.rodend._y;
this.onEnterFrame = function()
{
controlX = _root.hook._x;
controlY = _root.hook._y;
this.clear();
this.lineStyle(1,0,100);
this.moveTo(x1,y1);
this.lineTo(controlX,controlY,x2,y2);
};
onMouseDown = function()
{
if(_root.reelable >= 1)
{
tx = _root.hook._x;
mx = _root.rodend._x;
rx = tx - mx;
if(rx >= 1)
{
_root.hook._x -= _root.speed;
}
if(rx <= -1 && rx > -300)
{
_root.hook._x += _root.speed;
}
if(rx <= 1)
{
ty = _root.hook._y;
my = _root.rodend._y;
ry = ty - my;
if(ry >= 1)
{
_root.hook._y -= _root.speed;
}
if(ry <= -1 && ry > -300)
{
_root.hook._y += _root.speed;
}
}
_root.guy.hand.play();
}
};
Mouse.addListener(myListener);